<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改岗位')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-post-edit" th:object="${post}">
			<input id="postId" name="postId" type="hidden" th:field="*{postId}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">岗位名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="positionName" id="positionName" th:field="*{positionName}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">薪资：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="salary" id="salary" th:field="*{salary}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">公司全名：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" readonly="true" name="companyFullName" id="companyFullName" th:field="*{companyFullName}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">公司简称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" readonly="true" name="companyShortName" id="companyShortName" th:field="*{companyShortName}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">公司规模：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="companySize" id="companySize" th:field="*{companySize}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">融资阶段：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="financeStage" id="financeStage" th:field="*{financeStage}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作经验：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="workYear" id="workYear" th:field="*{workYear}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">学历要求：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="education" id="education" th:field="*{education}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">岗位福利：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="positionAdvantage" id="positionAdvantage" th:field="*{positionAdvantage}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">公司福利：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="companyLabelList" id="companyLabelList" th:field="*{companyLabelList}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">岗位类型：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="firstType" id="firstType" th:field="*{firstType}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">第二职位：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="secondType" id="secondType" th:field="*{secondType}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">经营范围：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="industryField" id="industryField" th:field="*{industryField}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">城市：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="city" id="city" th:field="*{city}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">区域：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="district" id="district" th:field="*{district}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">岗位状态：</label>
				<div class="col-sm-8">
					<label class="toggle-switch switch-solid">
						<input type="checkbox" id="status" th:checked="${post.status == '0' ? true : false}">
						<span></span>
					</label>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "system/post";

		function submitHandler() {
			var data = $("#form-post-edit").serializeArray();
			var status = $("input[id='status']").is(':checked') === true ? 0 : 1;
			data.push({"name": "status", "value": status});
			$.operate.save(prefix + "/edit", data);
	    }
	</script>
</body>
</html>
